<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilskey: Zynq EFUSE PS</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilskey
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__xilskey__zynq__efuse.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Zynq EFUSE PS</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga63c6c25524196e392935e0c9c9e34825"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynq__efuse.html#ga63c6c25524196e392935e0c9c9e34825">XilSKey_EfusePs_Write</a> (XilSKey_EPs *InstancePtr)</td></tr>
<tr class="memdesc:ga63c6c25524196e392935e0c9c9e34825"><td class="mdescLeft">&#160;</td><td class="mdescRight">PS eFUSE interface functions.  <a href="#ga63c6c25524196e392935e0c9c9e34825">More...</a><br/></td></tr>
<tr class="separator:ga63c6c25524196e392935e0c9c9e34825"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf4b1541decb6c6f85a71e95c6023e601"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynq__efuse.html#gaf4b1541decb6c6f85a71e95c6023e601">XilSKey_EfusePs_Read</a> (XilSKey_EPs *InstancePtr)</td></tr>
<tr class="memdesc:gaf4b1541decb6c6f85a71e95c6023e601"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to read the PS eFUSE.  <a href="#gaf4b1541decb6c6f85a71e95c6023e601">More...</a><br/></td></tr>
<tr class="separator:gaf4b1541decb6c6f85a71e95c6023e601"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae3fb5ac72380a5efddd99df27fde3c41"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynq__efuse.html#gae3fb5ac72380a5efddd99df27fde3c41">XilSKey_EfusePs_ReadStatus</a> (XilSKey_EPs *InstancePtr, u32 *StatusBits)</td></tr>
<tr class="memdesc:gae3fb5ac72380a5efddd99df27fde3c41"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to read the PS efuse status register.  <a href="#gae3fb5ac72380a5efddd99df27fde3c41">More...</a><br/></td></tr>
<tr class="separator:gae3fb5ac72380a5efddd99df27fde3c41"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gaf4b1541decb6c6f85a71e95c6023e601"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 XilSKey_EfusePs_Read </td>
          <td>(</td>
          <td class="paramtype">XilSKey_EPs *&#160;</td>
          <td class="paramname"><em>InstancePtr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is used to read the PS eFUSE. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>- Pointer to the PsEfuseHandle which describes which PS eFUSE should be burned.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS no errors occurred.</li>
<li>In case of error, value is as defined in <a class="el" href="xilskey__utils_8h.html">xilskey_utils.h</a>. Error value is a combination of Upper 8 bit value and Lower 8 bit value. For example, 0x8A03 should be checked in error.h as 0x8A00 and 0x03. Upper 8 bit value signifies the major error and lower 8 bit values tells more precisely. </li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>When called: This API initializes the timer, XADC subsystems. Unlocks the PS eFUSE Controller. Configures the PS eFUSE Controller and enables read-only mode. Reads the PS eFUSE (Hash Value), and enables read-only mode. Locks the PS eFUSE Controller. Returns an error, if the reference clock frequency is not in between 20 and 60MHz. or if unable to unlock PS eFUSE controller or requested address corresponds to restricted bits. or if the temperature and voltage are not within range </dd></dl>
<p>Check the variables</p>
<p>XAdc Initialization</p>
<p>Unlock the eFUSE controller</p>
<p>Check if the controller is unlocked</p>
<p>Configure the eFUSE controller with mode, strobe width values</p>
<p>Enable eFUSE reading only</p>
<p>Read the eFUSE</p>
<p>Read the RSA key Hash value from eFUSE Array</p>
<p>Disable Programming, write and read</p>
<p>Lock the eFUSE controller</p>

<p>References <a class="el" href="xilskey__eps_8c.html#a86aa3b42b03a38e86ae622b0338523cc">XilSKey_EfusePs_ControllerConfig()</a>, <a class="el" href="xilskey__eps_8c.html#a445869d8f60f01261334c1022c4b08f5">XilSKey_EfusePs_ControllerSetReadWriteEnable()</a>, <a class="el" href="xilskey__utils_8c.html#ac23b7512fa6d7680514d181ef2a51963">XilSKey_EfusePs_XAdcInit()</a>, <a class="el" href="xilskey__utils_8c.html#a2983af8944dad03a6326987278142199">XilSKey_Timer_Intialise()</a>, <a class="el" href="xilskey__epshw_8h.html#a440b422d4faa0d2d13a4c4fb59ae0bb1">XSK_EFUSEPS_CONTROLER_LOCK</a>, <a class="el" href="xilskey__epshw_8h.html#a0d28dedee1ceb722c49cb6da990a3199">XSK_EFUSEPS_CONTROLER_LOCK_STATUS</a>, <a class="el" href="xilskey__epshw_8h.html#a14cfddcfbb88c1b0c7c8c0559b22896c">XSK_EFUSEPS_CONTROLER_UNLOCK</a>, <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aac6c84ad0c0d1939c3af81903ce81fe10">XSK_EFUSEPS_ERROR_CONTROLLER_CONFIG</a>, <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aa51b19122bd2d929bac2c23850fd31f43">XSK_EFUSEPS_ERROR_CONTROLLER_LOCK</a>, <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aacb05a25d88a36ca191b47ab61bbde023">XSK_EFUSEPS_ERROR_PS_PARAMETER_WRONG</a>, <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aa9c4bc995f7882b30dd7604aac906e614">XSK_EFUSEPS_ERROR_PS_STRUCT_NULL</a>, <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aab2e32984f034a56bb748946e777c42e6">XSK_EFUSEPS_ERROR_READ_RSA_HASH</a>, <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aa1893196d6dc579318ff5b9eff4347a43">XSK_EFUSEPS_ERROR_XADC_INIT</a>, and <a class="el" href="xilskey__epshw_8h.html#afd1d475c7976c8d4057f1f422b38caa0">XSK_EFUSEPS_READ_MODE_NORMAL</a>.</p>

<p>Referenced by <a class="el" href="xilskey__efuse__example_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>.</p>

</div>
</div>
<a class="anchor" id="gae3fb5ac72380a5efddd99df27fde3c41"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 XilSKey_EfusePs_ReadStatus </td>
          <td>(</td>
          <td class="paramtype">XilSKey_EPs *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32 *&#160;</td>
          <td class="paramname"><em>StatusBits</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is used to read the PS efuse status register. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to the PS eFUSE instance. </td></tr>
    <tr><td class="paramname">StatusBits</td><td>Buffer to store the status register read.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS.</li>
<li>XST_FAILURE </li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>This API unlocks the controller and reads the Zynq PS eFUSE status register. </dd></dl>
<p>Unlock the eFUSE controller</p>
<p>Check if the controller is unlocked</p>
<p>Read the eFUSE status</p>

<p>References <a class="el" href="xilskey__epshw_8h.html#a0d28dedee1ceb722c49cb6da990a3199">XSK_EFUSEPS_CONTROLER_LOCK_STATUS</a>, <a class="el" href="xilskey__epshw_8h.html#a14cfddcfbb88c1b0c7c8c0559b22896c">XSK_EFUSEPS_CONTROLER_UNLOCK</a>, <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aa51b19122bd2d929bac2c23850fd31f43">XSK_EFUSEPS_ERROR_CONTROLLER_LOCK</a>, <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aa9c4bc995f7882b30dd7604aac906e614">XSK_EFUSEPS_ERROR_PS_STRUCT_NULL</a>, and <a class="el" href="xilskey__epshw_8h.html#a3f4977445c365f71eda60b2bba84727c">XSK_EFUSEPS_STATUS_REG</a>.</p>

<p>Referenced by <a class="el" href="xilskey__efuse__example_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>.</p>

</div>
</div>
<a class="anchor" id="ga63c6c25524196e392935e0c9c9e34825"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 XilSKey_EfusePs_Write </td>
          <td>(</td>
          <td class="paramtype">XilSKey_EPs *&#160;</td>
          <td class="paramname"><em>InstancePtr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>PS eFUSE interface functions. </p>
<p>PS eFUSE interface functions.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>- Pointer to the PsEfuseHandle which describes which PS eFUSE bit should be burned.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS.</li>
<li>In case of error, value is as defined in <a class="el" href="xilskey__utils_8h.html">xilskey_utils.h</a> Error value is a combination of Upper 8 bit value and Lower 8 bit value. For example, 0x8A03 should be checked in error.h as 0x8A00 and 0x03. Upper 8 bit value signifies the major error and lower 8 bit values tells more precisely. </li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>When called, this Initializes the timer, XADC subsystems. Unlocks the PS eFUSE controller.Configures the PS eFUSE controller. Writes the hash and control bits if requested. Programs the PS eFUSE to enable the RSA authentication if requested. Locks the PS eFUSE controller. Returns an error, if the reference clock frequency is not in between 20 and 60 MHz or if the system not in a position to write the requested PS eFUSE bits (because the bits are already written or not allowed to write) or if the temperature and voltage are not within range </dd></dl>
<p>Check the variables</p>
<p>XAdc Initialization</p>
<p>Unlock the eFUSE controller</p>
<p>Check if the controller is unlocked</p>
<p>If eFUSE Array is write protected no more writes are possible</p>
<p>Configure the eFUSE controller with mode, strobe width values.</p>
<p>Enable Programming, write and read</p>
<p>Initialize the timer for delay while programming the eFUSE</p>
<p>Program the eFUSE based on the structure values</p>
<p>Program the eFUSE bit 0xA to enable ROM 128K CRC</p>
<p>Program the RSA key Hash value in eFUSE Array \</p>
<p>Check if all the hash eFUSE bits are zero or not</p>
<p>Program the RSA hash</p>
<p>Program the eFUSE bit 0xB to enable RSA authentication</p>
<p>Program the eFUSE bit 0x8,0x9 to enable eFUSE Array Write Protection</p>
<p>Once enabled the write protection, we will not be able to program any PS eFUSE afterwards</p>
<p>SLCR reset is required for write protect to take into effect</p>
<p>Disable Programming, write and read</p>
<p>Lock the eFUSE controller</p>

<p>References <a class="el" href="xilskey__utils_8c.html#a3f78c13955deedf337289569a5dc0387">XilSKey_Efuse_StartTimer()</a>, <a class="el" href="xilskey__eps_8c.html#a86aa3b42b03a38e86ae622b0338523cc">XilSKey_EfusePs_ControllerConfig()</a>, <a class="el" href="xilskey__eps_8c.html#a445869d8f60f01261334c1022c4b08f5">XilSKey_EfusePs_ControllerSetReadWriteEnable()</a>, <a class="el" href="xilskey__epshw_8h.html#ab40242d2cc93420c7a7bb744ddfee68c">XilSKey_EfusePs_IsEfuseWriteProtected</a>, <a class="el" href="xilskey__utils_8c.html#ac23b7512fa6d7680514d181ef2a51963">XilSKey_EfusePs_XAdcInit()</a>, <a class="el" href="xilskey__utils_8c.html#a2983af8944dad03a6326987278142199">XilSKey_Timer_Intialise()</a>, <a class="el" href="xilskey__epshw_8h.html#ab3e22310d214573799dd3337599f5dde">XSK_EFUSEPS_APB_DFT_JTAG_DISABLE</a>, <a class="el" href="xilskey__epshw_8h.html#aa9c2a75e70d7dd0ac999bb7b2157dbec">XSK_EFUSEPS_APB_DFT_MODE_DISABLE</a>, <a class="el" href="xilskey__epshw_8h.html#a043fd44c43605e5b4992086603099367">XSK_EFUSEPS_APB_ROM_128K_CRC_ENABLE</a>, <a class="el" href="xilskey__epshw_8h.html#ab1e2ac0d16c9642260c14232003ade75">XSK_EFUSEPS_APB_RSA_AUTH_ENABLE</a>, <a class="el" href="xilskey__epshw_8h.html#a0248a7f53d9204f32b9de14b855b5d3d">XSK_EFUSEPS_APB_WRITE_PROTECTION_ADDR_1</a>, <a class="el" href="xilskey__epshw_8h.html#a439afda37a15708eaef5b5e643553d2b">XSK_EFUSEPS_APB_WRITE_PROTECTION_ADDR_2</a>, <a class="el" href="xilskey__epshw_8h.html#a440b422d4faa0d2d13a4c4fb59ae0bb1">XSK_EFUSEPS_CONTROLER_LOCK</a>, <a class="el" href="xilskey__epshw_8h.html#a0d28dedee1ceb722c49cb6da990a3199">XSK_EFUSEPS_CONTROLER_LOCK_STATUS</a>, <a class="el" href="xilskey__epshw_8h.html#a14cfddcfbb88c1b0c7c8c0559b22896c">XSK_EFUSEPS_CONTROLER_UNLOCK</a>, <a class="el" href="xilskey__epshw_8h.html#a8b6db89bcacd73a511cfc74cd117d058">XSK_EFUSEPS_ENABLE_PROGRAMMING</a>, <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aac6c84ad0c0d1939c3af81903ce81fe10">XSK_EFUSEPS_ERROR_CONTROLLER_CONFIG</a>, <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aa51b19122bd2d929bac2c23850fd31f43">XSK_EFUSEPS_ERROR_CONTROLLER_LOCK</a>, <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aa7008920237d925ff68a1db0ed9de2ffe">XSK_EFUSEPS_ERROR_EFUSE_WRITE_PROTECTED</a>, <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aacb05a25d88a36ca191b47ab61bbde023">XSK_EFUSEPS_ERROR_PS_PARAMETER_WRONG</a>, <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aa9c4bc995f7882b30dd7604aac906e614">XSK_EFUSEPS_ERROR_PS_STRUCT_NULL</a>, <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aab087899f320bf9af544752114275aa5f">XSK_EFUSEPS_ERROR_READ_HASH_BEFORE_PROGRAMMING</a>, <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aafd7a966bc5100c5068dc16188e098efa">XSK_EFUSEPS_ERROR_WRITE_128K_CRC_BIT</a>, <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aa1947c18302787ce037a2aba2c2dd9c69">XSK_EFUSEPS_ERROR_WRITE_RSA_AUTH_BIT</a>, <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aad82de1dd6c5b84728d634eed9de15629">XSK_EFUSEPS_ERROR_WRITE_RSA_HASH</a>, <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aa37165006942d17b451832e511f602136">XSK_EFUSEPS_ERROR_WRITE_WRITE_PROTECT_BIT</a>, <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aa0752715b6bd927becb1904bcd37dab51">XSK_EFUSEPS_ERROR_WRTIE_DFT_JTAG_DIS_BIT</a>, <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aa63a2bc5d1a556e070c907a202ea0a294">XSK_EFUSEPS_ERROR_WRTIE_DFT_MODE_DIS_BIT</a>, <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aa1893196d6dc579318ff5b9eff4347a43">XSK_EFUSEPS_ERROR_XADC_INIT</a>, <a class="el" href="xilskey__epshw_8h.html#afd1d475c7976c8d4057f1f422b38caa0">XSK_EFUSEPS_READ_MODE_NORMAL</a>, and <a class="el" href="xilskey__epshw_8h.html#ab89168a190f2b176fc52aa119fbfd4bb">XSK_EFUSEPS_SINGLE_MODE</a>.</p>

<p>Referenced by <a class="el" href="xilskey__efuse__example_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
